This simulation implements a reaction-diffusion system based on the Gray–Scott model. Reaction–diffusion systems describe how the concentration of one or more substances distributed in space changes under the influence of local chemical reactions and diffusion.
The model is governed by the equations:
∂A/∂t = Dₐ ∇²A – A·B² + f(1 – A)
∂B/∂t = Dᵦ ∇²B + A·B² – (k + f)B
In this system, A and B are the concentrations of two chemicals. Dₐ and Dᵦ are their respective diffusion rates, f is the feed rate, and k is the kill rate. Tweaking these parameters yields a variety of striking patterns.
- Use the sliders below the simulation to adjust the feed and kill rates in real time.
- The simulation is based on a cellular grid where each cell updates its chemical concentrations based on its neighbors.
- Refresh the page to restart the simulation with new initial conditions.
- Experiment with the parameters to see how different settings affect the emergent patterns.
This simulation was created to demonstrate the beauty and complexity of reaction-diffusion systems. It uses 100% procedural graphics to generate evolving patterns in real time, all within a single file.
I poured my enthusiasm into crafting this simulation so that it not only looks impressive but also serves as a learning tool to explore emergent phenomena. Enjoy the journey!